package cn.com.huak.www.sell.dataObject;

import cn.com.huak.www.sell.enums.OrderStatusEnum;
import cn.com.huak.www.sell.enums.PayStatusEnum;
import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单主表
 * @author huak@wanggang
 * @date 2018/12/30 20:06
 */
@Entity
@Data
@DynamicUpdate
public class OrderMaster {
    /* 订单id */
    @Id
    private String id;

    /* 买家名称 */
    private String buyerName;

    /* 买家电话 */
    private String buyerPhone;

    /* 买家地址 */
    private String buyerAddress;

    /* 买家微信id */
    private String buyerOpenid;

    /* 订单总金额 */
    private BigDecimal orderAmount;

    /* 订单状态 默认为0 新订单 */
    private Integer orderStatus = OrderStatusEnum.NEW.getCode();

    /* 订单支付状态 默认是0 未支付 */
    private Integer payStatus = PayStatusEnum.WAIT.getCode();

    /* 创建时间 */
    private Date createTime;

    private Date updateTime;
}
